projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88af7b4
)
gtk-demo: Update aspect-ratio when selecting new puzzle
author
Benjamin Otte
<otte@redhat.com>
Tue, 10 Jul 2018 11:28:37 +0000
(13:28 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Fri, 13 Jul 2018 12:56:04 +0000
(14:56 +0200)
demos/gtk-demo/sliding_puzzle.c
patch
|
blob
|
history
diff --git
a/demos/gtk-demo/sliding_puzzle.c
b/demos/gtk-demo/sliding_puzzle.c
index 5ce5316159d81764d45674c82af4b9cb816cfd30..60762342c96678b7f199805a2d290737206b355b 100644
(file)
--- a/
demos/gtk-demo/sliding_puzzle.c
+++ b/
demos/gtk-demo/sliding_puzzle.c
@@
-295,6
+295,7
@@
start_puzzle (GdkPaintable *puzzle)
grid = gtk_grid_new ();
gtk_widget_set_can_focus (grid, TRUE);
gtk_container_add (GTK_CONTAINER (frame), grid);
+ gtk_aspect_frame_set (GTK_ASPECT_FRAME (frame), 0.5, 0.5, (float) gdk_paintable_get_intrinsic_aspect_ratio (puzzle), FALSE);
/* Add a key event controller so people can use the arrow
* keys to move the puzzle */